package com.yang.project.base.proxy;

public class SmsServiceTest {
    public static void main(String[] args) {
//        SmsServiceImpl smsService = new SmsServiceImpl();
//        SmsServiceProxy smsServiceProxy = new SmsServiceProxy(smsService);
//        smsServiceProxy.send();
        //使用jdk动态代理
//        SmsService o = (SmsService)JDKProxyFactory.newProxy(new SmsServiceImpl());
//        o.send();
        //使用cglib代理类
        AliyunSmsService aliyunSmsService = (AliyunSmsService) CglibProxyFactory.createProxy(AliyunSmsService.class);
        aliyunSmsService.send();
    }
}
